<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{background-color: palegreen;}
        .cls{background-color: blue;}
        #aidi{background-color: red;}
        div p{background-color: white;}
        p{background-color: green;}
    </style>
</head>

<body>
    <div class="cls" id="aidi" style="background-color: yellow;">test
        <p>这是个p</p>
    </div>
    <p>这是个P</p>
</body>

</html>